package com.cheng.spider.custom;

public class GenerateUrlSource extends AbstractUrlSource {

    private String urlPrefix;

    private String urlSuffix;

    private int start;

    private int end;

    public GenerateUrlSource(String urlPrefix, String urlSuffix, int start, int end) {
        this.urlPrefix = urlPrefix;
        this.urlSuffix = urlSuffix;
        this.start = start;
        this.end = end;
    }


    public void fullQueue() {
        for (int i = start; i <= end; i++) {
            queue.offer(urlPrefix + i + urlSuffix);
        }
    }


}
